package com.yueka.mapper;

import com.yueka.pojo.instrument_category.InstrumentCategory;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface InstrumentCategoryMapper {
    List<InstrumentCategory> list();

    @Insert("insert into instrument_category (ic_name, status, description, create_time, update_time) values(#{icName}, #{status}, #{description}, #{createTime}, #{updateTime})")
    Integer insert(InstrumentCategory instrumentCategory);

    @Update("update instrument_category set ic_name = #{icName}, status = #{status}, description = #{description}, update_time = #{updateTime} where id = #{id}")
    Integer update(InstrumentCategory instrumentCategory);

    Integer delete(Integer[] ids);

    @Select("select id, ic_name, status, description, create_time, update_time from instrument_category where status = '1'")
    List<InstrumentCategory> getInstrumentList();
}
